
/****************************************************************************
** ui.h extension file, included from the uic-generated form implementation.
**
** If you want to add, delete, or rename functions or slots, use
** Qt Designer to update this file, preserving your code.
**
** You should not define a constructor or destructor in this file.
** Instead, write your code in functions called init() and destroy().
** These will automatically be called by the form's constructor and
** destructor.
*****************************************************************************/

#include <qvalidator.h>
#include <qcolordialog.h>
#include <qcanvas.h>
#include <qfont.h>
#include <qfontdialog.h>


#include "mainwindow.h"

void impExportDB::init()
{



}



void impExportDB::enableBtOk()
{
   btOk->setEnabled(true);
}



void impExportDB::testSQLConnect()
{


   QSqlDatabase *db = QSqlDatabase::addDatabase(boxDbSelect->currentText());
   db->setHostName(lineServerAddress->text());
   db->setDatabaseName(lineDatabaseName->text());
   db->setUserName(lineUser->text());
   db->setPassword(linePassword->text());

   if (!db->open()) {
      db->lastError().showMessage();
  } else{
        enableBtOk();
   }
}



void impExportDB::accept()
{
   done(true);
}
